{% comment %}
<!--
  Copyright (C) 2008 ZHENG Zhong <heavyzheng nospam-at gmail D0T com>
  - http://heavyz.blogspot.com/
  - http://buggarden.blogspot.com/

  The restaurant's tags section.
  
  Created on 2008-10-16.
  $Id: resto_tags.html 270 2008-11-07 19:13:13Z heavyzheng $
-->
{% endcomment %}

<div id="resto_tags" class="section">

  {% if error %}
    <div class="error message">
      {{ error }}
      <a href="javascript:void(0);" onclick="closeMessage('#resto_tags')">[close]</a>
    </div>
  {% endif %}

  <div class="form-toggle">
    <p>
      Tags:
      {% if resto.tags %}
        {% for tag in resto.tags %}
          <a href="/fnr/search/tags/{{ tag }}/">{{ tag }}</a>
        {% endfor %}
      {% else %}
        <i>no tags</i>
      {% endif %}
    </p>
    {% if editable %}
      {% if resto.is_current_user_editor or is_admin %}
        <a href="javascript:void(0);" onclick="showEditForm('#resto_tags')">[edit]</a>
      {% endif %}
    {% endif %}
  </div><!--/.form-toggle-->
  
  {% if editable %}
    {% if resto.is_current_user_editor or is_admin %}
    
      <form class="edit-form hidden" action="." method="POST">
        <input type="hidden" name="section" value="resto_tags"/>
        Tags: <input type="text" size="40" name="tags" value="{{ resto.tags_str }}"/>
        <input type="button" value="Update" onclick="submitEditForm('#resto_tags');"/>
        <input type="button" value="Cancel" onclick="hideEditForm('#resto_tags');"/>
      </form><!--/.edit-form-->
      
      <div class="submitting hidden">
        <img src="/static/fnr/images/waiting.gif" alt="Submitting"/>
        Submitting your request... Please wait...
      </div><!--/.submitting-->
    
    {% endif %}
  {% endif %}

</div><!--/#resto_tags-->

